﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Inventor2.Master" AutoEventWireup="true" CodeBehind="regfamilyok2.aspx.cs" Inherits="HospitalSystem.regfamilyok2" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <style type="text/css">

        .style1
        {
            font-size: x-large;
            color: #FF0066;
        }
        .style4
        {
            font-size: medium;
        }
        .style5
        {
            font-size: medium;
            font-weight: normal;
        }
        .style10
        {
            font-size: small;
        }
        .style11
        {
            font-size: x-large;
            color: #FF0066;
            width: 580px;
        }
        .style12
        {
            height: 21px;
        }
        .style13
        {
            width: 381px;
        }
        .style15
        {
            width: 105px;
            color: #000000;
        }
        .style16
        {
            width: 242px;
        }
        .style17
        {
            width: 267px;
        }
        .style19
        {
            width: 384px;
        }
        .style20
        {
            width: 147px;
            color: #000000;
        }
         .style25
        {
          
            color: #000000;
        }
        .style26
        {
            font-size: small;
            color: #000000;
        }
        .style27
        {
            width: 267px;
            font-size: small;
            color: #000000;
        }
    .style28
    {
        width: 123px;
        color: #000000;
    }
    .style29
    {
        font-size: small;
        width: 580px;
    }
        .style30
        {
            width: 588px;
        }
        .style31
        {
            width: 596px;
            text-align: right;
        }
        .style33
        {
            height: 21px;
            width: 208px;
        }
        .style34
        {
            width: 208px;
            color: #000000;
        }
        .style35
        {
            font-size: small;
            font-weight: normal;
        }
        .style36
        {
            font-size: medium;
            color: #000000;
        }
        .auto-style1 {
            width: 172px;
        }
        .auto-style4 {
            width: 224px;
        }
        .auto-style5 {
            color: #000000;
            width: 224px;
        }
        .auto-style6 {
            width: 98px;
        }
        .auto-style7 {
            width: 98px;
            color: #000000;
        }
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder2" runat="server">
    
</asp:Content>

<asp:Content ID="Content3" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <div id="sidebar">
	<ul>
		<li>
			<h2>ลงทะเบียน,แก้ไขข้อมูล</h2>
			<ul>	
				<li><a href="reg.aspx?CID=<%=Request.QueryString["CID"]%>">ข้อมูลส่วนตัว</a></li>
				<li><a href="regfamilyok2.aspx"  class="current">ข้อมูลครอบครัว</a></li>
				<li><a href="healthinfo.aspx">ข้อมูลด้านสุขภาพ</a></li>
                <li><a href="education.aspx">ข้อมูลด้านการศึกษา</a></li>
                <li><a href="rightsinfoshow.aspx">ข้อมูลสิทธิ</a></li>
				<li><asp:Image ID="Image1" runat="server" Height="162px" Width="179px" /></li>
			</ul>
		</li>
	</ul>
</div>
				<div id="content">
    <h3>
                    <span class="style36">ลงทะเบียนครอบครัว</span> </h3>

                       <asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
<asp:Panel ID="PatientInfoPanel" runat="server" BorderStyle="None" 
        GroupingText="ข้อมูลผู้รับบริการที่กำลังทำรายการ" Width="750px" ForeColor="black">
    <table class="style11">
                
                <tr>
                    <td class="style34">
                        <span class="style10"></span></td>
                    <td class="style17">
                        &nbsp;</td>
                    <td class="style37">
                        </span></td>
                    <td class="style16">
                        &nbsp;</td>
                    <td class="style16">
                        &nbsp;</td>
                </tr>
                <tr>
                    <td class="style34">
                        <span class="style10">ชื่อ&nbsp;
                        <asp:Label ID="FName" runat="server"></asp:Label>
                        </span>
                    </td>
                    <td class="style27">
                        นามสกุล</td>
                    <td class="style37">
                        <asp:Label ID="LName" runat="server" CssClass="style26"></asp:Label>
                        </span>
                    </td>
                    <td class="style16">
                        &nbsp;</td>
                    <td class="style16">
                        &nbsp;</td>
                </tr>
                <tr>
                    <td class="style33">
                        <span class="style10"><span class="style25">เลขประจำตัวประชาชน :</span></span></td>
                    <td class="style12" colspan="2">
                        <asp:Label ID="CIDLBL" runat="server" Text="xxxxxxxxxxxxx" ForeColor="Black" 
                            style="font-size: small"></asp:Label>
                        </span>
                        </td>
                    <td class="style12">
                        </td>
                    <td class="style12">
                        </td>
                </tr>
      
                <tr>
                    <td class="style1" colspan="5">
                        <span class="style26">ผู้ดูแลหลัก :<asp:GridView ID="familylist1" 
                            runat="server" AllowPaging="True" AllowSorting="True" 
                            AutoGenerateColumns="False" CssClass="style6" PageSize="5" 
                            style="font-size: small; text-align: center;" Width="500px">
                            <Columns>
                                <asp:HyperLinkField DataNavigateUrlFields="CID,fCID" 
                                    DataNavigateUrlFormatString="~/regfamilyok2.aspx?CID={0}&amp;fCID={1}" 
                                    DataTextField="fCID" HeaderText="เลขประชาชน" />
                                <asp:HyperLinkField DataNavigateUrlFields="CID,fCID" 
                                    DataNavigateUrlFormatString="~/regfamilyok2.aspx?CID={0}&amp;fCID={1}" 
                                    DataTextField="Name" HeaderText="ชื่อ" />
                                <asp:HyperLinkField DataNavigateUrlFields="CID,fCID" 
                                    DataNavigateUrlFormatString="~/regfamilyok2.aspx?CID={0}&amp;fCID={1}" 
                                    DataTextField="LastName" HeaderText="นามสกุล" />
                                <asp:HyperLinkField DataNavigateUrlFields="CID,fCID" 
                                    DataNavigateUrlFormatString="~/regfamilyok2.aspx?CID={0}&amp;fCID={1}" 
                                    DataTextField="MariageStatus" HeaderText="ความสัมพันธ์" />
                            </Columns>
                            <AlternatingRowStyle BackColor="White" />
                            <EditRowStyle BackColor="#2461BF" />
                            <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                            <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="black" />
                            <PagerSettings FirstPageText="First" LastPageText="Last" 
                                Mode="NumericFirstLast" PageButtonCount="2" />
                            <PagerStyle BackColor="#2461BF" ForeColor="black" HorizontalAlign="Center" />
                            <RowStyle BackColor="#EFF3FB" />
                            <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
                            <SortedAscendingCellStyle BackColor="#F5F7FB" />
                            <SortedAscendingHeaderStyle BackColor="#6D95E1" />
                            <SortedDescendingCellStyle BackColor="#E9EBEF" />
                            <SortedDescendingHeaderStyle BackColor="#4870BE" />
                        </asp:GridView>
                        </span>
                        <asp:Button runat="server" Text="ลบผุ้ดูแลหลัก" ID="dele_carer" 
                            onclick="dele_carer_Click" Visible="False" CssClass="style10" />
                    </td>
                </tr>
                </table>    
    </asp:Panel> 

<asp:Panel ID="FamilyInfoPanel" runat="server" BorderStyle="None" 
        GroupingText="ข้อมูลญาติผู้รับบริการ" Width="750px" ForeColor="black">
    <asp:GridView ID="familylist" runat="server" 
        AutoGenerateColumns="False" AllowPaging="True" AllowSorting="True" 
        PageSize="5" CssClass="style10" 
        onpageindexchanging="familylist_SelectedIndexChanged" Width="554px" 
        >
            <Columns>
                <asp:TemplateField HeaderText="ลำดับที่">
                    <ItemTemplate>
                        <%# Container.DataItemIndex + 1 %>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:HyperLinkField   
                    HeaderText="เลขประชาชน"  
                    DataNavigateUrlFields="CID,fCID"  
                    DataNavigateUrlFormatString="~/regfamilyok2.aspx?CID={0}&fCID={1}"  
                    DataTextField="fCID"  
                    />
                <asp:HyperLinkField   
                    HeaderText="ชื่อ"  
                    DataNavigateUrlFields="CID,fCID"  
                    DataNavigateUrlFormatString="~/regfamilyok2.aspx?CID={0}&fCID={1}"  
                    DataTextField="Name"  
                    />
                <asp:HyperLinkField   
                    HeaderText="นามสกุล"  
                    DataNavigateUrlFields="CID,fCID"  
                    DataNavigateUrlFormatString="~/regfamilyok2.aspx?CID={0}&fCID={1}"  
                    DataTextField="LastName"  
                    />
                <asp:HyperLinkField   
                    HeaderText="ความสัมพันธ์"  
                    DataNavigateUrlFields="CID,fCID"  
                    DataNavigateUrlFormatString="~/regfamilyok2.aspx?CID={0}&fCID={1}"  
                    DataTextField="MariageStatus"  
                    />


                     <asp:HyperLinkField   
                    HeaderText="เลือกเป็นผู้ดูแลหลัก"  
                    DataNavigateUrlFields="CID,fCID"  
                    DataNavigateUrlFormatString="~/CarerSelect.aspx?CID={0}&fCID={1}"  
                    Text="เลือกเป็นผู้ดูแลหลัก"
                    />

                    
            </Columns>
            <AlternatingRowStyle BackColor="White" />
            <EditRowStyle BackColor="#2461BF" />
            <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
            <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
            <PagerSettings FirstPageText="First" LastPageText="Last" 
            Mode="NumericFirstLast" PageButtonCount="2" />
            <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
            <RowStyle BackColor="#EFF3FB" />
            <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
            <SortedAscendingCellStyle BackColor="#F5F7FB" />
            <SortedAscendingHeaderStyle BackColor="#6D95E1" />
            <SortedDescendingCellStyle BackColor="#E9EBEF" />
            <SortedDescendingHeaderStyle BackColor="#4870BE" />
        </asp:GridView>   
        &nbsp;<asp:GridView ID="familylist0" runat="server" AllowPaging="True" 
        AllowSorting="True" AutoGenerateColumns="False" CssClass="style10" 
        PageSize="5" onpageindexchanging="familylist_SelectedIndexChanged2" 
        Width="553px">
        <Columns>
            <asp:TemplateField HeaderText="ลำดับที่">
                <ItemTemplate>
                    <%# Container.DataItemIndex + 1 %>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:HyperLinkField DataNavigateUrlFields="CID,fCID" 
                DataNavigateUrlFormatString="~/regfamilyok2.aspx?CID={0}&amp;fCID={1}" 
                DataTextField="fCID" HeaderText="เลขประชาชน" />
            <asp:HyperLinkField DataNavigateUrlFields="CID,fCID" 
                DataNavigateUrlFormatString="~/regfamilyok2.aspx?CID={0}&amp;fCID={1}" 
                DataTextField="Name" HeaderText="ชื่อ" />
            <asp:HyperLinkField DataNavigateUrlFields="CID,fCID" 
                DataNavigateUrlFormatString="~/regfamilyok2.aspx?CID={0}&amp;fCID={1}" 
                DataTextField="LastName" HeaderText="นามสกุล" />
            <asp:HyperLinkField DataNavigateUrlFields="CID,fCID" 
                DataNavigateUrlFormatString="~/regfamilyok2.aspx?CID={0}&amp;fCID={1}" 
                DataTextField="MariageStatus" HeaderText="ความสัมพันธ์" />
           
        </Columns>
        <AlternatingRowStyle BackColor="White" />
        <EditRowStyle BackColor="#2461BF" />
        <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
        <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
        <PagerSettings FirstPageText="First" LastPageText="Last" 
            Mode="NumericFirstLast" PageButtonCount="2" />
        <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
        <RowStyle BackColor="#EFF3FB" />
        <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
        <SortedAscendingCellStyle BackColor="#F5F7FB" />
        <SortedAscendingHeaderStyle BackColor="#6D95E1" />
        <SortedDescendingCellStyle BackColor="#E9EBEF" />
        <SortedDescendingHeaderStyle BackColor="#4870BE" />
    </asp:GridView>
    </asp:Panel> 
        <asp:Button ID="WelfareEdit_Button" runat="server" onclick="WelfareEdit_Button_Click" 
                Text="เพิ่มบุคคลในครอบครัว" style="text-align: center; margin-left: 300px" 
        Visible="True" />

<asp:Panel ID="WelfareRegPanel" runat="server" BorderStyle="None" 
        GroupingText="ข้อมูลญาติผู้รับบริการโดยละเอียด" Width="750px" ForeColor="black"
        Visible="False">
    <table class="style50">
                
                <tr>
                    <td class="style15">
                        &nbsp;</td>
                    <td class="style10">
                        &nbsp;</td>
                    <td class="style4">
                        &nbsp;</td>
                    <td class="style5">
                        &nbsp;</td>
                    <td class="style3">
                        &nbsp;</td>
                </tr>
                <tr>
                    <td class="style15">
                        ชื่อ&nbsp;
                        <asp:Label ID="RFName" runat="server"></asp:Label>
                    </td>
                    <td class="style10">
                        นามสกุล</td>
                    <td class="style4">
                        <asp:Label ID="RLName" runat="server" style="font-size: small"></asp:Label>
                    </td>
                    <td class="style5">
                        &nbsp;</td>
                    <td class="style3">
                        &nbsp;</td>
                </tr>
                <tr>
                    <td class="style25">
                        เลขประจำตัวประชาชน :</td>
                    <td class="style25" colspan="2">
                        <asp:Label ID="RCIDLBL" runat="server" Text="xxxxxxxxxxxxx" ForeColor="Black" 
                            style="font-size: small"></asp:Label>
                        </td>
                    <td class="style5">
                        &nbsp;</td>
                    <td class="style3">
                        &nbsp;</td>
                </tr>
                 <tr>
                    <td class="style15">
                        สัญชาติ&nbsp;:
                        <asp:Label ID="NationLB" runat="server"></asp:Label>
                    </td>
                    <td class="style10">
                        เชื้อชาติ :</td>
                    <td class="style4">
                        <asp:Label ID="RaceLB" runat="server" style="font-size: small"></asp:Label>
                    </td>
                    <td class="style35">
                        ศาสนา :</td>
                    <td class="style3">
                        <asp:Label ID="ReligionLB" runat="server"></asp:Label>
                     </td>
                </tr>
      
                
                <tr>
                    <td class="style15">
                        &nbsp;</td>
                    <td class="style10">
                        &nbsp;</td>
                    <td class="style4">
                        &nbsp;</td>
                    <td class="style5">
                        &nbsp;</td>
                    <td class="style3">
                        &nbsp;</td>
                </tr>
                <tr>
                    <td class="style15">
                        &nbsp;</td>
                    <td class="style10">
                        &nbsp;</td>
                    <td class="style4">
                        &nbsp;</td>
                    <td class="style5">
                        &nbsp;</td>
                    <td class="style3">
                        &nbsp;</td>
                </tr>     
                </table>
                <asp:Panel ID="CensusRegPanel" runat="server" BorderStyle="None" 
        GroupingText="ข้อมูลที่อยู่อาศัยในทะเบียนบ้าน" Width="750px" ForeColor="black"
        Visible="False">
        <table class="style50">
          
            <tr>
                <td class="style15">
                    &nbsp;</td>
                <td class="style17">
                    &nbsp;</td>
                <td class="style37">
                    &nbsp;</td>
                <td class="style16">
                    &nbsp;</td>
                <td class="style16">
                    &nbsp;</td>
            </tr>
            <tr>
                <td class="style15">
                    บ้านเลขที่</td>
                <td class="style17">
                    <asp:Label ID="CHomeLB" runat="server"></asp:Label>
                </td>
                <td class="style37">
                    &nbsp;</td>
                <td class="style16">
                    หมู่</td>
                <td class="style16">
                    <asp:Label ID="CGroupLB" runat="server"></asp:Label>
                </td>
            </tr>
            <tr>
                <td class="style15">
                    ชื่อหมูบ้าน</td>
                <td class="style17">
                    <asp:Label ID="CVillageLB" runat="server"></asp:Label>
                </td>
                <td class="style37">
                    &nbsp;</td>
                <td class="style16">
                    ซอย</td>
                <td class="style16">
                    <asp:Label ID="CSoyLB" runat="server"></asp:Label>
                </td>
            </tr>
            <tr>
                <td class="style25">
                    ถนน</td>
                <td class="style25" colspan="2">
                    <asp:Label ID="CStreetLB" runat="server"></asp:Label>
                </td>
                <td class="style25">
                    ตำบล</td>
                <td class="style25">
                    <asp:Label ID="CTambonLB" runat="server"></asp:Label>
                </td>
            </tr>
            <tr>
                <td class="style25">
                    อำเภอ</td>
                <td class="style25" colspan="2">
                    &nbsp;<asp:Label ID="CCityLB" runat="server"></asp:Label>
                </td>
                <td class="style25">
                    จังหวัด</td>
                <td class="style25">
                    <asp:Label ID="CProvinceLB" runat="server"></asp:Label>
                </td>
            </tr>
            <tr>
                <td class="style25">
                    รหัสไปรษณีย์</td>
                <td class="style25" colspan="2">
                    <asp:Label ID="CPostcodeLB" runat="server"></asp:Label>
                </td>
                <td class="style25">
                    &nbsp;</td>
                <td class="style25">
                    &nbsp;</td>
            </tr>
            <tr>
                <td class="style25">
                    วันที่ย้ายเข้า</td>
                <td class="style25" colspan="2">
                    &nbsp;<asp:Label ID="CMIDLB" runat="server"></asp:Label>
                </td>
                <td class="style25">
                    วันที่ย้ายออก</td>
                <td class="style25">
                    <asp:Label ID="CMOBLB" runat="server"></asp:Label>
                </td>
            </tr>
            <tr>
                <td class="style25">
                    &nbsp; &nbsp;</td>
                <td class="style25" colspan="2">
                    &nbsp;&nbsp;&nbsp;</td>
                <td class="style25">
                    &nbsp;</td>
                <td class="style25">
                    &nbsp;</td>
            </tr>
            <tr>
                <td class="style25">
                    &nbsp;</td>
                <td class="style25" colspan="2">
                    &nbsp;</td>
                <td class="style25">
                    &nbsp;</td>
                <td class="style25">
                    &nbsp;</td>
            </tr>
        </table>
        </asp:Panel>  
        <asp:Panel ID="LiveRegPanel" runat="server" BorderStyle="None" 
        GroupingText="ข้อมูลที่อยู่อาศัยปัจจุบัน" Width="750px" Visible="False" ForeColor="black">
        <table class="style50">
          
            <tr>
                <td class="style15">
                    &nbsp;</td>
                <td class="style19">
                    &nbsp;</td>
                <td class="style20">
                    &nbsp;</td>
                <td class="style13">
                    &nbsp;</td>
            </tr>
            <tr>
                <td class="style15">
                    บ้านเลขที่</td>
                <td class="style19">
                    <asp:Label ID="LHomeLB" runat="server"></asp:Label>
                </td>
                <td class="style20">
                    หมู่</td>
                <td class="style13">
                    <asp:Label ID="LGroupLB" runat="server"></asp:Label>
                </td>
            </tr>
            <tr>
                <td class="style15">
                    ชื่อหมูบ้าน</td>
                <td class="style19">
                    <asp:Label ID="LVillageLB" runat="server"></asp:Label>
                </td>
                <td class="style20">
                    ซอย</td>
                <td class="style13">
                    <asp:Label ID="LSoyLB" runat="server"></asp:Label>
                </td>
            </tr>
            <tr>
                <td class="style25">
                    ถนน</td>
                <td class="style19">
                    <asp:Label ID="LStreetLB" runat="server"></asp:Label>
                </td>
                <td class="style20">
                    ตำบล</td>
                <td class="style13">
                    <asp:Label ID="LTambonLB" runat="server"></asp:Label>
                </td>
            </tr>
            <tr>
                <td class="style25">
                    อำเภอ</td>
                <td class="style19">
                    <asp:Label ID="LCityLB" runat="server"></asp:Label>
                </td>
                <td class="style20">
                    จังหวัด</td>
                <td class="style13">
                    <asp:Label ID="LProvinceLB" runat="server"></asp:Label>
                </td>
            </tr>
            <tr>
                <td class="style25">
                    รหัสไปรษณีย์</td>
                <td class="style19">
                    <asp:Label ID="LPostcodeLB" runat="server"></asp:Label>
                </td>
                <td class="style20">
                    &nbsp;</td>
                <td class="style13">
                    &nbsp;</td>
            </tr>
            <tr>
                <td class="style25">
                    วันที่ย้ายเข้า</td>
                <td class="style19">
                    <asp:Label ID="LMIDLB" runat="server"></asp:Label>
                </td>
                <td class="style20">
                    วันที่ย้ายออก</td>
                <td class="style13">
                    <asp:Label ID="LMODLB" runat="server"></asp:Label>
                </td>
            </tr>
            <tr>
                <td class="style25">
                    &nbsp;</td>
                <td class="style19">
                    &nbsp;&nbsp;&nbsp;
                    </td>
                <td class="style20">
                    &nbsp;</td>
                <td class="style13">
                    &nbsp;</td>
            </tr>
            <tr>
                <td class="style25">
                    &nbsp;</td>
                <td class="style19">
                    &nbsp;</td>
                <td class="style20">
                    &nbsp;</td>
                <td class="style13">
                    &nbsp;</td>
            </tr>
        </table>
        </asp:Panel>  

    <br />
    <asp:Panel ID="Panel5" runat="server" GroupingText="ข้อมูลการศึกษาและทำงาน">
        ระดับการศึกษา
        <asp:Label ID="EducationLevelLB" runat="server" Text="Label"></asp:Label>
        <br />
        <br />
        อาชีพ&nbsp;
        <asp:Label ID="OccupationLB" runat="server" Text="Label"></asp:Label>
        <br />
        <br />
        สถานที่ทำงาน
        <asp:Label ID="AddressOccupationLB" runat="server" Text="Label"></asp:Label>
        <br />
        <br />
        รายได้ต่อเดือน
        <asp:Label ID="IncomePerMonthLB" runat="server" Text="Label"></asp:Label>
        <br />
        <br />
        รายได้จากที่อื่น
        <asp:Label ID="OtherIncomeLB" runat="server" Text="Label"></asp:Label>
        <br />
        <br />
        ที่มาของรายได้
        <asp:Label ID="OtherIncomeFromLB" runat="server" Text="Label"></asp:Label>
        <br />
        <br />
        <asp:Button ID="RegWF_Button" runat="server" Height="26px" 
            onclick="RegWF_Button_Click" style="text-align: center; margin-left: 5px" 
            Text="แก้ไข" />
        <br />
    </asp:Panel>

    </asp:Panel> 



    <asp:Panel ID="Panel1" runat="server" BorderStyle="None" 
        GroupingText="ข้อมูลญาติผู้รับบริการโดยละเอียด" Width="750px" ForeColor="black"
        Visible="False">
    <table class="style50">
                
                <tr>
                    <td class="style28">
                        &nbsp;</td>
                    <td class="auto-style1">
                        &nbsp;</td>
                    <td class="style4">
                        &nbsp;</td>
                    <td class="style12">
                        &nbsp;</td>
                    <td class="style3">
                        &nbsp;</td>
                </tr>
                <tr>
                    <td class="style28">
                        ชื่อ&nbsp;
                        <asp:DropDownList ID="TitlesD" runat="server" Width="100px">
                        </asp:DropDownList>
                    </td>
                    <td class="auto-style1">
                        <asp:TextBox ID="FirstName" runat="server"></asp:TextBox>
                        <asp:RequiredFieldValidator ID="reqName5" runat="server" controltovalidate="FirstName" errormessage="*" />
                    </td>
                    <td class="style10">
                        นามสกุล</td>
                    <td class="style12">
                        <asp:TextBox ID="LastName" runat="server"></asp:TextBox>
                        <asp:RequiredFieldValidator ID="reqName6" runat="server" controltovalidate="LastName" errormessage="*" />
                    </td>
                    <td class="style3">
                        &nbsp;</td>
                </tr>
                <tr>
                    <td class="style28">
                        <asp:DropDownList ID="MariageStatus" runat="server">
                        </asp:DropDownList>
                        <asp:RequiredFieldValidator ID="reqName1" runat="server" controltovalidate="MariageStatus" errormessage="เลือกความสัมพันธ์" InitialValue="0" />
                    </td>
                    <td class="auto-style1">
                        สถานะการมีชีวิต</td>
                    <td class="style4" colspan="3">
                        <asp:RadioButtonList ID="LiveStatusRBL" runat="server" style="font-size: small">
                        </asp:RadioButtonList>
                        <asp:RequiredFieldValidator ID="reqName0" runat="server" controltovalidate="LiveStatusRBL" errormessage="โปรดเลือกสถานะการมีชีวิต" />
                    </td>
                </tr>
                <tr>
                    <td class="style28">
                        เลขประจำตัวประชาชน :</td>
                    <td class="style25" colspan="3">
                        <asp:TextBox ID="CIDTB" runat="server" ForeColor="Black" OnTextChanged="CIDTB_TextChanged"></asp:TextBox>
                        <asp:RequiredFieldValidator ID="reqName4" runat="server" controltovalidate="CIDTB" errormessage="โปรดใส่เลขประจำตัวประชาชน13หลัก" />
                        <asp:Label ID="CIDST" runat="server" Visible="False">55555+</asp:Label>
                        </td>
                    <td class="style3">
                        &nbsp;</td>
                </tr>
                 <tr>
                    <td class="style28">
                        สัญชาติ&nbsp;:
                        <asp:TextBox ID="NationTB" runat="server"></asp:TextBox>
                    </td>
                    <td class="auto-style1">
                        เชื้อชาติ :</td>
                    <td class="style4">
                        <asp:TextBox ID="RaceTB" runat="server"></asp:TextBox>
                    </td>
                    <td class="style12">
                        &nbsp;</td>
                    <td class="style3">
                        &nbsp;</td>
                </tr>
      
                
                <tr>
                    <td class="style28">
                        &nbsp;
                    </td>
                    <td class="auto-style1">
                        ศาสนา :</td>
                    <td class="style4">
                        <asp:TextBox ID="ReligionTB" runat="server"></asp:TextBox>
                    </td>
                    <td class="style12">
                        &nbsp;</td>
                    <td class="style3">
                        &nbsp;</td>
                </tr>
                <tr>
                    <td class="style28">
                        สถานะสมรส :</td>
                    <td class="auto-style1">
                        <asp:RadioButtonList ID="MariageStatusRBL" runat="server">
                        </asp:RadioButtonList>
                    </td>
                    <td class="style4" colspan="2">
                        <asp:RequiredFieldValidator ID="reqName" runat="server" controltovalidate="MariageStatusRBL" errormessage="โปรดเลือกสถานะสมรส" />
                    </td>
                    <td class="style3">
                        &nbsp;</td>
                </tr>
                <tr>
                    <td class="style28">
                        &nbsp;</td>
                    <td class="auto-style1">
                        &nbsp;</td>
                    <td class="style4">
                        &nbsp;</td>
                    <td class="style12">
                        &nbsp;</td>
                    <td class="style3">
                        &nbsp;</td>
                </tr>     
                </table>
                <asp:Panel ID="Panel2" runat="server" BorderStyle="None" 
        GroupingText="ข้อมูลที่อยู่อาศัยในทะเบียนบ้าน" Width="750px" Visible="False" ForeColor="black">
        <table class="style50">
          
            <tr>
                <td class="style15">
                    &nbsp;</td>
                <td class="style17">
                    &nbsp;</td>
                <td class="style37">
                    &nbsp;</td>
                <td class="auto-style6">
                    &nbsp;</td>
                <td class="style16">
                    &nbsp;</td>
            </tr>
            <tr>
                <td class="style15">
                    บ้านเลขที่</td>
                <td class="style17">
                    <asp:TextBox ID="CHomeTB" runat="server"></asp:TextBox>
                </td>
                <td class="style37">
                    &nbsp;</td>
                <td class="auto-style6">
                    หมู่</td>
                <td class="style16">
                    <asp:TextBox ID="CGroupTB" runat="server"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td class="style15">
                    ชื่อหมู่บ้าน</td>
                <td class="style17">
                    <asp:TextBox ID="CHomeNTB" runat="server"></asp:TextBox>
                </td>
                <td class="style37">
                    &nbsp;</td>
                <td class="auto-style6">
                    ซอย</td>
                <td class="style16">
                    <asp:TextBox ID="CSoyTB" runat="server"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td class="style25">
                    ถนน</td>
                <td class="style25" colspan="2">
                    <asp:TextBox ID="CStreetTB" runat="server"></asp:TextBox>
                </td>
                <td class="auto-style7">
                    ตำบล</td>
                <td class="style25">
                    <asp:DropDownList ID="CTambonD" runat="server">
                        <asp:ListItem Value="0">เลือกอำเภอก่อน</asp:ListItem>
                    </asp:DropDownList>
                </td>
            </tr>
            <tr>
                <td class="style25">
                    อำเภอ</td>
                <td class="style25" colspan="2">
                    <asp:DropDownList ID="CCityD" runat="server" AutoPostBack="True" 
                        onselectedindexchanged="CCityD_SelectedIndexChanged">
                        <asp:ListItem Value="0">เลือกจังหวัดก่อน</asp:ListItem>
                    </asp:DropDownList>
                </td>
                <td class="auto-style7">
                    จังหวัด</td>
                <td class="style25">
                    <asp:DropDownList ID="CProvinceD" runat="server" AutoPostBack="True" 
                        onselectedindexchanged="CProvinceD_SelectedIndexChanged">
                    </asp:DropDownList>
                </td>
            </tr>
            <tr>
                <td class="style25">
                    รหัสไปรษณีย์</td>
                <td class="style25" colspan="2">
                    <asp:TextBox ID="CPostcodeTB" runat="server" MaxLength="5"></asp:TextBox>
                </td>
                <td class="auto-style7">
                    &nbsp;</td>
                <td class="style25">
                    &nbsp;</td>
            </tr>
            <tr>
                <td class="style25">
                    &nbsp;</td>
                <td class="style25" colspan="2">
                    &nbsp;</td>
                <td class="auto-style7">
                    &nbsp;</td>
                <td class="style25">
                    &nbsp;</td>
            </tr>
            <tr>
                <td class="style25">
                    วันที่ย้ายเข้า</td>
                <td class="style25" colspan="2">
                    &nbsp;<em><asp:TextBox ID="CMIDTB" runat="server">1/1/1800</asp:TextBox>
                    </em>
                    <asp:ImageButton ID="CMIDIB" runat="server" ImageUrl="~/img/cal.png" 
                        onclick="CMIDIB_Click" />
                    <asp:Calendar ID="CMIDCal" runat="server" BackColor="Silver" 
                        BorderStyle="Dashed" onselectionchanged="CMIDCal_SelectionChanged" 
                        ShowGridLines="True" Visible="False">
                        <DayHeaderStyle BackColor="#999999" />
                        <DayStyle BackColor="#0066CC" />
                        <NextPrevStyle BackColor="Silver" />
                        <SelectedDayStyle BackColor="#CC6600" />
                        <TodayDayStyle BackColor="#CC6600" />
                    </asp:Calendar>
                </td>
                <td class="auto-style7">
                    วันที่ย้ายออก</td>
                <td class="style25">
                    <asp:TextBox ID="CMODTB" runat="server">1/1/1800</asp:TextBox>
                    <asp:ImageButton ID="CMODIB" runat="server" ImageUrl="~/img/cal.png" 
                        onclick="CMODIB_Click" />
                    <asp:Calendar ID="CMODCal" runat="server" BackColor="Silver" 
                        BorderStyle="Dashed" onselectionchanged="CMODCal_SelectionChanged" 
                        ShowGridLines="True" Visible="False">
                        <DayHeaderStyle BackColor="#999999" />
                        <DayStyle BackColor="#0066CC" />
                        <NextPrevStyle BackColor="Silver" />
                        <SelectedDayStyle BackColor="#CC6600" />
                        <TodayDayStyle BackColor="#CC6600" />
                    </asp:Calendar>
                </td>
            </tr>
            <tr>
                <td class="style25">
                    สาเหตุการย้ายออก</td>
                <td class="style25" colspan="2">
                    &nbsp;&nbsp;&nbsp;<asp:RadioButtonList ID="CensusMoveOutReason" runat="server">
                        <asp:ListItem Value="1">ตาย</asp:ListItem>
                        <asp:ListItem Value="2">ย้าย</asp:ListItem>
                        <asp:ListItem Value="3">สาบสูญ</asp:ListItem>
                        <asp:ListItem Value="0">ไม่มี</asp:ListItem>
                    </asp:RadioButtonList>
                </td>
                <td class="auto-style7">
                    &nbsp;</td>
                <td class="style25">
                    &nbsp;</td>
            </tr>
            <tr>
                <td class="style25">
                    &nbsp;</td>
                <td class="style25" colspan="3">
                    <asp:RequiredFieldValidator ID="reqName2" runat="server" controltovalidate="CensusMoveOutReason" errormessage="โปรดเลือกสาเหตุการย้ายออก(ถ้าไม่มีให้เลือกไม่มี)" />
                </td>
                <td class="style25">
                    &nbsp;</td>
            </tr>
        </table>
        </asp:Panel>  
        <asp:Panel ID="Panel3" runat="server" BorderStyle="None" 
        GroupingText="ข้อมูลที่อยู่อาศัยปัจจุบัน" Width="750px" Visible="False" ForeColor="black">
        <table class="style50">
          
            <tr>
                <td class="style15">
                    &nbsp;</td>
                <td class="style17">
                    ใช้ข้อมูลตามทะเบียนบ้านกรุณากด
                    <asp:CheckBox ID="LiveCopyCheck" runat="server" AutoPostBack="True" oncheckedchanged="LiveCopyCheck_CheckedChanged" />
                    ย</td>
                <td class="style37">
                    &nbsp;</td>
                <td class="style16">
                    &nbsp;</td>
                <td class="style16">
                    &nbsp;</td>
            </tr>
            <tr>
                <td class="style15">
                    บ้านเลขที่</td>
                <td class="style17">
                    <asp:TextBox ID="LHomeTB" runat="server"></asp:TextBox>
                </td>
                <td class="style37">
                    &nbsp;</td>
                <td class="style16">
                    หมู่</td>
                <td class="style16">
                    <asp:TextBox ID="LGroupTB" runat="server"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td class="style15">
                    ชื่อหมู่บ้าน</td>
                <td class="style17">
                    <asp:TextBox ID="LHomeNTB" runat="server"></asp:TextBox>
                    &nbsp;</td>
                <td class="style37">
                    &nbsp;</td>
                <td class="style16">
                    ซอย</td>
                <td class="style16">
                    <asp:TextBox ID="LSoyTB" runat="server"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td class="style25">
                    ถนน</td>
                <td class="style25" colspan="2">
                    <asp:TextBox ID="LStreetTB" runat="server"></asp:TextBox>
                </td>
                <td class="style25">
                    ตำบล</td>
                <td class="style25">
                    <asp:DropDownList ID="LTambonD" runat="server">
                        <asp:ListItem Value="0">เลือกอำเภอก่อน</asp:ListItem>
                    </asp:DropDownList>
                </td>
            </tr>
            <tr>
                <td class="style25">
                    อำเภอ</td>
                <td class="style25" colspan="2">
                    <asp:DropDownList ID="LCityD" runat="server" AutoPostBack="True" 
                        onselectedindexchanged="LCityD_SelectedIndexChanged">
                        <asp:ListItem Value="0">เลือกจังหวัดก่อน</asp:ListItem>
                    </asp:DropDownList>
                </td>
                <td class="style25">
                    จังหวัด</td>
                <td class="style25">
                    <asp:DropDownList ID="LProvinceD" runat="server" AutoPostBack="True" 
                        onselectedindexchanged="LProvinceD_SelectedIndexChanged">
                    </asp:DropDownList>
                </td>
            </tr>
            <tr>
                <td class="style29">
                    รหัสไปรษณีย์</td>
                <td class="style11" colspan="2">
                    <asp:TextBox ID="LPostcodeTB" runat="server" MaxLength="5"></asp:TextBox>
                </td>
                <td class="style11">
                    </td>
                <td class="style11">
                    </td>
            </tr>
            <tr>
                <td class="style25">
                    &nbsp;</td>
                <td class="style25" colspan="2">
                    &nbsp;</td>
                <td class="style25">
                    &nbsp;</td>
                <td class="style25">
                    &nbsp;</td>
            </tr>
            <tr>
                <td class="style25">
                    วันที่ย้ายเข้า</td>
                <td class="style25" colspan="2">
                    <asp:TextBox ID="LMIDTB" runat="server">1/1/1800</asp:TextBox>
                    <asp:ImageButton ID="LMIDIB" runat="server" ImageUrl="~/img/cal.png" 
                        onclick="LMIDIB_Click" />
                    <asp:Calendar ID="LMIDCal" runat="server" NextPrevFormat="ShortMonth" 
                        onselectionchanged="LMIDCal_SelectionChanged" ShowGridLines="True" 
                        Visible="False">
                        <DayHeaderStyle BackColor="#999999" />
                        <DayStyle BackColor="#0066CC" />
                        <NextPrevStyle BackColor="Silver" />
                        <SelectedDayStyle BackColor="#CC6600" />
                        <TodayDayStyle BackColor="#CC6600" />
                    </asp:Calendar>
                </td>
                <td class="style25">
                    วันที่ย้ายออก</td>
                <td class="style25">
                    <asp:TextBox ID="LMODTB" runat="server">1/1/1800</asp:TextBox>
                    <asp:ImageButton ID="LMODIB" runat="server" ImageUrl="~/img/cal.png" 
                        onclick="LMODIB_Click" />
                    <asp:Calendar ID="LMODCal" runat="server" 
                        onselectionchanged="LMODCal_SelectionChanged" ShowGridLines="True" 
                        Visible="False">
                        <DayHeaderStyle BackColor="#999999" />
                        <DayStyle BackColor="#0066CC" />
                        <NextPrevStyle BackColor="Silver" />
                        <SelectedDayStyle BackColor="#CC6600" />
                        <TodayDayStyle BackColor="#CC6600" />
                    </asp:Calendar>
                </td>
            </tr>
            <tr>
                <td class="style25">
                    สาเหตุการย้ายออก</td>
                <td class="style25" colspan="2">
                    &nbsp;&nbsp;&nbsp;
                    <asp:RadioButtonList ID="LiveMoveOutReason" runat="server">
                        <asp:ListItem Value="1">ตาย</asp:ListItem>
                        <asp:ListItem Value="2">ย้าย</asp:ListItem>
                        <asp:ListItem Value="3">สาบสูญ</asp:ListItem>
                        <asp:ListItem Value="0">ไม่มี</asp:ListItem>
                    </asp:RadioButtonList>
                </td>
                <td class="style25">
                    &nbsp;</td>
                <td class="style25">
                    &nbsp;</td>
            </tr>
            <tr>
                <td class="style25">
                    &nbsp;</td>
                <td class="style25" colspan="2">
                    <asp:RequiredFieldValidator ID="reqName3" runat="server" controltovalidate="LiveMoveOutReason" errormessage="โปรดเลือกสาเหตุการย้ายออก(ถ้าไม่มีให้เลือกไม่มี)" />
                </td>
                <td class="style25">
                    &nbsp;</td>
                <td class="style25">
                    &nbsp;</td>
            </tr>
        </table>
        </asp:Panel>  

    </asp:Panel> 
    <asp:Panel ID="Panel4" runat="server" GroupingText="การศึกษาและการทำงาน" 
        Visible="False" Width="750px" ForeColor="black">
        <table>
            <tr>
                <td>
                    ระดับการศึกษา
                </td>
                <td>
                    <asp:RadioButtonList ID="EducationLevelRBL" runat="server">
                    </asp:RadioButtonList>
                    <br />
                    <asp:RequiredFieldValidator ID="reqName7" runat="server" controltovalidate="EducationLevelRBL" errormessage="เลือกระดับการศึกษา" />
                </td>
            </tr>
            <tr>
                <td>
                    อาชีพ
                </td>
                <td>
                    <asp:RadioButtonList ID="OccupationRBL" runat="server">
                    </asp:RadioButtonList>
                    <br />
                    <asp:RequiredFieldValidator ID="reqName8" runat="server" controltovalidate="OccupationRBL" errormessage="อาชีพ" />
                </td>
            </tr>
            <tr>
                <td>
                    สถานที่ทำงาน
                </td>
                <td>
                    <asp:TextBox ID="AddressOccupationTB" runat="server"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td>
                    รายได้ต่อเดือน
                </td>
                <td>
                    <asp:TextBox ID="IncomePerMonthTB" runat="server"></asp:TextBox>&nbsp;บาท
                </td>
            </tr>
            <tr>
                <td>
                    รายได้จากที่อื่น
                </td>
                <td>
                    <asp:TextBox ID="OtherIncomeTB" runat="server"></asp:TextBox>&nbsp;บาท
                </td>
            </tr>
            <tr>
                <td>
                    ที่มาของรายได้
                </td>
                <td>
                    <asp:TextBox ID="OtherIncomeFromTB" runat="server"></asp:TextBox>
                </td>
            </tr>
        </table>
        <table>
            <tr>
                <td class="style30" style="text-align: center">
                    <asp:Button ID="Button1" runat="server" onclick="Button1_Click" 
                    style="text-align: center; margin-left: 5px" Text="บันทึก" />
                </td>
            </tr>
        </asp:Panel>
    </table>
</ContentTemplate>
</asp:UpdatePanel>       
    <table>
        <tr>
            <td class="style31">
               <a id="A1"  href="reg.aspx"><img src="img/black.jpg" alt="black" 
                    class="style1"></a>
               <a id="A2"  href="healthinfo.aspx"><img src="img/next.jpg" alt="next" 
                    class="style1"></a></td>
        </tr>
    </table>
                    </div>
    </asp:Content>

